# Contributor:
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=openal-soft
pkgver=1.20.1
pkgrel=1
pkgdesc="software implementation of OpenAL API"
options="!check"
url="https://kcat.strangesoft.net/openal.html"
arch="all"
license="LGPL-2.0-or-later"
depends_dev="alsa-lib-dev"
makedepends="$depends_dev linux-headers cmake"
subpackages="$pkgname-dev"
source="http://kcat.strangesoft.net/openal-releases/openal-soft-$pkgver.tar.bz2"

build() {
	local _cpuext_neon=
	case "$CARCH" in
		armhf) _cpuext_neon=-DALSOFT_CPUEXT_NEON=OFF;;
	esac
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		$_cpuext_neon
	make -C build
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="a8a03a2162b5d35e66adc079e81d7fa075b83a3ee1cec3412cb40f7789263ed8bd005beefb7ef995f464dfa43aac22ea0f547b752dfc7533ed9120a95fb92513  openal-soft-1.20.1.tar.bz2"
